System for converting event-driven code into serially executed code

ABSTRACT

An environment for developing clientside/serverside code is disclosed. The environment supports programming in an event-driven paradigm while the execution of the resultant programs are executed in a serial execution paradigm. Through shielding the developer from complex scripting segments, the environment provides the developer with the suggestion that that resultant execution model is event-driven.

I. RELATED APPLICATION INFORMATION

The present application is a Divisional application of U.S. Ser. No.09/223,773 (filed Dec. 31, 1998), and now issued as U.S. Pat. No.6,981,215, entitled “System for converting event-driven code intoserially executed code” (issued Dec. 27, 2005); and is related to U.S.Ser. No. 08/959,300, now issued as U.S. Pat. No. 6,035,119, entitled“Method and Apparatus for Automatic Generation of Text andComputer-Executable Code” (filed Oct. 28, 1997); to U.S. Ser. No.09/223,558, now issued as U.S. Pat. No. 6,889,379, entitled“Transporting Objects Between a Client and a Server” (filed Dec. 31,1998); to U.S. Ser. No. 09/223,565, now issued as U.S. Pat. No.6,714,219, entitled “Drag and Drop Creation and Editing of a PageIncorporating Scripts” (filed Dec. 31, 1998); and to U.S. Ser. No.09/223,774, now issued as U.S. Pat. No. 7,284,193, entitled “Page ObjectModel” (filed Dec. 31, 1998).

II. BACKGROUND OF THE INVENTION

A. Technical Field

In general, the present invention relates to authoring of text andcomputer-executable code, and more particularly to techniques forautomatically generating HTML (hypertext markup language) script.

In recent years, the Internet has experienced tremendous growth. Itsrapid development has resulted in a growing number of new uses of theInternet and its multimedia component, the World Wide Web (the Web). Inparticular, demand for richer, faster and more interactive web siteshave been driven increasingly sophisticated users. To attract moredemanding users, commercial and corporate Internet site authors attemptto stay ahead of their competition by providing more sites for users andpotential customers.

Enabling the growth of the Internet, corporate users have expanded theapplication of HTML into intranets. In this area, creators of authoringtools have strived to enable authors to create content-rich web siteswith minimal effort.

When the world-wide web was first invented, the language used to publishdata was a simple text-oriented formatting device. A server would sendHTML documents to a client computer running a browser that would displaythe HTML content on the screen according to the formatting informationembedded in it. The browser would transmit a request for a particularHTML file and this HTML the server in response to the request wouldtransmit file to the client. These HTML documents contained referencesto graphic files, which were also sent from the server to the client anddisplayed according to the embedded instructions in the HTML code.

As the web grew in popularity, second-generation web-sites added moresophisticated formatting such as tables and frames and displayedgraphics as background along with other formatting devices. Still,content was still contained in files that were simply transmitted tobrowsers in response to requests for particular documents. In addition,server-side programs would custom-generate HTML documents in response torequests for specific information. For example the server would access adatabase in response to a search query and produce an ephemeral HTMLdocument that it would then send to the browser. However, suchinteractive sites were not common because of the sophisticatedserver-side scripting that was required. Even after third generationssites, which provided Java script applets, Adobe PDF files, animatedgraphic files, offered rather sophisticated look to sites, most sitesrelied on simply pushing fixed documents and applets to browsers inresponse to specific requests.

Recently with the introduction of Microsoft® Corporation's (of Redmond,Wash.) Visual, InterDev® 1.0 product, the process of creating sites thatcustom-generate files for consumption and display by browsers has beendramatically simplified by employing various interesting techniques.These include:

1. Server-side scripting (Active Server Pages—ASP—developed byMicrosoft®) that allows dynamic web applications similar to Java, DHTML,and Active-X, which run on the client. An event occurring on the clientis transmitted to the server application and new page-layout data issent to the client to show the result.

2. ASP objects that are wizard-like components that work similarly toActive-X controls implemented on clients. They have properties, methods,and events and must be instantiated (except for some pre-instantiatedcomponents that are always available).

3. Web Bots included in Front Page 97® are server-side components thatadd functionality like that provided by CGI scripting.

4. Visual InterDev® 1.0's raison d'etre, perhaps, is the convenientintegration of databases with web sites without sophisticatedprogramming. This integration is simplified through the use of acompatibility standard and a suite of pre-defined tools that may beincorporated in ASP script.

ASPs may be called using a URL (uniform resource locator) which mayrefer to the ASP file “page.asp” as follows:“<http://www.anycompany.com/page.asp>.” While the following descriptionuses the term “active server page” or “ASP,” any document or page whichcontains a script which, when executed, pulls data from a database andforwards it to an end application (another document or page) fallswithin the scope of the term, ASP, as used herein.

Requests to ASPs commonly take the form of user requests from a client'sbrowser. An example of a request is a request for current sport scoresfrom a web site. In the process of requesting, the browser, located onthe client, accesses the ASP with a request that provides additionalinformation to the server. For example, an active server page, named“scores”, may be connected to a database storing all current sportscores. To access any particular set of scores, a browser user specifiesto the server which scores are of interest (here, baseball scores).Next, the browser attempts to access the <scores.asp> file with a“baseball” parameter attached to the file request (e.g.,<scores.asp?sport-baseball>. In this example, “scores.asp” is the activeserver page on the server, “sport” is a filter control handling theparameter “baseball”. In response to this request, the server forwardsthe desired baseball scores in HTML format back to the browser. Uponreceiving this new information, the current page is flushed and the newHTML data (containing the baseball scores in a predefined format) isdisplayed in the end user's browser. The returned information can alsobe images, documents, links to images or documents, or other data.

There are a few downsides to the use ASPs in complex sites. First,referring to an ASP with the current scripting parameters is laboriousespecially with long parameter strings. Developers who are familiar withhigher order languages (including C++ and VISUAL BASIC 5.0®) must revertto complex naming schemes for creating the client and server sidescripts. This reversion creates the opportunity for errors and the needfor additional debugging time.

Also, as currently used, each ASP is directed to a single script. For alarge web site, with each and every ASP, no matter how closely they arerelated, the ASPs require a separate files. Thus, the number of requiredfiles for a complex site grows significantly. To this end, maintenanceof the site becomes extremely complex and inefficient as eachmodification to the site may require significant redrafting code for themultiple ASPs. The near duplication of the ASPs can require significantexpenditures in time and planning of the web site, when a number of ASPsare so closely related. Currently, there is no efficient way ofconsolidating ASPs into related groups.

In addition to the above functional elements, Visual InterDev® 1.0includes a host of features that relate to the development environment.Basically these features include such well-known user-interface featuressuch as drag-and-drop, WYSIWYG, etc. Developers are allowed toinstantiate programming objects using a visual metaphor. These ideas arewell developed in the Microsoft Visual Basic® product which takes theseideas substantially further than was possible in Visual InterDev® 1.0for a number of reasons which are explained below.

The development of web applications is complicated by a number offeatures stemming from the web context. In a classical client-servercontext, the capabilities of the client computer and those of the servercomputer are defined in advance of development of applications. In theweb environment, the capabilities of the client are not clearly defined.Some clients run browsers such as 2.x browsers lack capabilities, suchas the ability to run Java applets that are present in 3.x and 4.xbrowsers. A web application that seeks to provide sophisticatedfunctionality is confronted with the problem of where to run the codethat generates the sophisticated functionality sought: on the client oron the server. Some simple tasks can be performed on “dumb” clients suchas forms. A programmer is basically stuck with the problem of writingprograms that can handle both situations: putting the sophistication onthe server, sending plain HTML to the dumb clients as well as puttingthe sophistication on the client sending program components to a smartclient and letting the client run them.

Another feature of web applications is that the client-serverinteraction is both ephemeral and contentious in that the number ofdifferent clients potentially compete for the limited resources. Forthis reason, web pages that are generated by server scripts aregenerally dumped after they are sent to the client. The request datatransmitted by the client can be saved for a limited “lifetime” to allowa user to recall the web page. (“Lifetime” may embrace any criterionused for determining whether to persist a page, for example, for aperiod of time after the user's last visit or as long as the usercontinues to view and revisit the page without visiting another site,etc.) This involves regeneration of the page. This situation is not toobad in and of itself. However, scripting the calling and called pages tohandle the control flow required inevitably involves a lot of tediousold-fashioned sequential coding. That is, at a minimum, to add a page'scontent, or to employ any script incorporated in the page, to a callingpage, the calling page must be scripted to handle the called page, andthe called page, a return to the calling page. Conditional branchingwould also be involved which can be tedious and complex.

There is currently no way to incorporate the functionality of adestination ASP into a current page. Placing the following tag on aclient's page “<A HREF=“http://www.anycompany.com/alpha/page.asp”>”allows the user to select the tag and navigate to the ASP named“page.asp” in the “alpha” directory of the www.anycompany.com site.However, once the page.asp is selected with specific parameters, thecurrent page is lost with all its information. The only way to return tothe current page and modify the information transmitted to the ASP is bybacktracking and re-entering the previously entered parameters. Whileobject-oriented programming exists with respect to other programmingareas, there is little or no support for objects in program files ofHTML pages including ASPs.

Returning to the general problem of “managing state,” consider the“lifetime” of a simple ASP page that contains a form for data-entry intoa database:

-   -   User navigates to the page—an HTTP GET causes the server to run        the ASP to produce a page for the client.    -   The browser displays the page and the user enters data and        submits the form, causing an HTTP POST to the server.    -   The server runs the ASP page again to process the post. The code        parses the post parameters, updates the database and produces a        new version of the page for the client that informs the user the        data has been successfully entered.

It is clear that if the web developer wants to maintain some stateinformation over the lifetime of the page, then simply declaring avariable in client or server code is not sufficient. And obviously thedeveloper must do much more if it is necessary to share this stateinformation between code on the client and server.

There are three categories of state information:

-   -   Page—maintained for the lifetime of a page    -   Session—maintained for the duration of a user's session    -   Application—maintained for the duration of the application for        all users

ASP supports caching data and objects in the server in the Session andApplication objects, providing a means for maintaining session andapplication state information. A common technique for managing pagestate is to place values in hidden form elements. The form elementstravel with the page to the client, can be modified, and they travelwith the HTTP POST data back to the server. A developer using thistechnique must write server code to create the form elements on thepage, write client code to access the form elements through the DocumentObject Model, write more server code to parse the values from the postparameters, and must be sure to write the values back out in the formelements for the new page that is sent to the client in response to thepost. This is another common task that complicates web programming andresults in duplication of effort. In addition to the coding overhead,the sheer complexity of sites with a high degree of sophisticatedfunctionality can be oppressive. Being stuck with old-fashionedsequential programs makes the management of the development andimprovement of web sites exceedingly complex, even unwieldy.

Finally, the way a client or server accesses an ASP is through script onthe client/server page. Managing these scripts can be confusing as thescripts on the server and the client may look similar, yet requireslightly different structures and parameter fields. Adding to the levelof complexity, in some instances, the server script may generate theclient script. To keep track of the complexity of scripts, some pageeditors color code client script differently from server script.However, as pages become increasingly complex, color-coding is notsufficient to support complex site management as the site becomesincreasingly harder to conceptualize.

III. SUMMARY OF THE INVENTION

A method and apparatus for the development of web sites treats web pagescript files and components according to an event-driven model and moregenerally as objects with exposed methods and properties in a mannerthat, at development time, provides a common appearance whether theassociated script or components are ultimately run on the client or theserver. According to a feature, script files and even simple HTML pagesare referenced as objects to provide a simple programming namingstructure (also referred to as a simplified namespace) and obviatesequential coding structure otherwise required to cross reference codeand page content among various callable elements of a web site.

Using the invention, ASPs are able to appear to other files as objectswith associated methods and properties. The methods are written in awidely supported language (for example, Javascript, Livescript, orJScript). The properties are stored on the server side so as to allowmultiple clients to access stored properties. Proxies of the propertiesare transmitted from the ASP to the client as needed.

Also, according to the invention, ASPs may contain various objectswithin each single page. Instead of creating each separate ASP tosupport a particular set of functions, the functions may be convertedinto objects and stored in a general ASP. Based on these adaptations,ASPs are readily adopted by high level programmers trained inobject-oriented programming rather than to manually written executablescripts for HTML pages.

One technique of referring to ASPs as objects, and the nesting theobjects within the ASPs, is through design-time controls developed byMicrosoft®. Additional disclosure of design-time controls is describedin U.S. Ser. No. 08/959,300, entitled “Method and Apparatus forAutomatic Generation of Text and Computer-Executable Code”, filed onOct. 28, 1997, the contents of which are incorporated for any and allessential subject matter. A design-time control may be a form of ageneric control (for example, an ACTIVEX® control, of the MicrosoftCorporation of Redmond, Wash.). In general, a design-time control allowsa developer to place a script in a document that alters or enhances theoperation of the document.

Design-time controls incorporate wizard-like interfaces that can beedited to modify the text they generate for a web page. DTCs takeadvantage of OLE design-time capabilities (including directmanipulations, property sheets, and persistence) to capture user inputs,thereby extending the capabilities of editors that support design-timecontrols.

A design-time control differs from a general control in that it operatesonly in an editor (or container) when a web site is being designed ormaintained. Once the web site is saved, the design-time control maycreate (among other things) script for the client/server/ASPs. Asapplied to the present invention, the developer uses the design-timecontrol to attach object identification information including method andproperty information to each ASP. When saved, the attached objectidentification information and methods and properties are converted fromthe high level, object-oriented programming language into theappropriate HTML recognizable representations so that any client/serversystem supporting HTML may use the rendered client/server files.Currently, end users are limited to a small number of browsers. By usingdesign-time controls to write multiple versions of the client/serverscript, the number of different clients' browsers and servers that canbe supported almost limitless because each browser can be supported inone or more DTCs.

Editors insert design-time controls, which allow a page to operate as anobject (referred to as a “page object” or “P.O. DTC”) into the ASPfiles. These ‘P.O. DTCs’, when instantiated in an editor, provide theuser interface which supports the disclosed programming model reducedwith naming requirements. When run in an editor, the P.O. DTC promptsthe user for various information regarding the file itself (e.g., “am Ian object? What are my method and properties?”). Thus, the page objectis put onto the page by the user. The user interacts with the DTC'suser-interface to indicate what methods and properties define the pageas an object. As a result, the DTC generates the appropriate script(client-side or server-side).

As used herein, a persist operation refers to writing information to anon-volatile storage medium where the information relates to the currentstate of an object. The information written is such that, when theobject is recreated in memory, the object can be restored to itsprevious state. Herein, an instantiate operation refers to creating aninstance of an object type in memory.

In one embodiment, the present invention uses a Component Object Model(COM) component thereby allowing the controls to be utilized acrossmultiple applications. Advantageously, the present invention may beimplemented within any type of HTML editor, including but not limitedto, Front Page 98® and Visual InterDev 98® editors.

As used herein, ASP objects are generalized with the scripting namespaceof page.method and page.property. The “page” is the ASP page. The“method” and “property” are those associated with the page, as specifiedthrough the P.O. DTC.

The present invention may be utilized in applications that requirecomplex or lengthy scripting thereby alleviating the burden ondevelopers or programmers. Also, the programmer need not know all of thedetails necessary for scripting since the control of the presentinvention can perform the necessary scripting. Such applications mayinclude applications incorporating complex database controls, forexample.

The script generated by the Page Object DTC includes server script,which creates a JavaScript object. The JavaScript object is given thename that user assigned to the Page Object. That object may then bereferenced by script on the page whenever the public methods andproperties of the Page Object are to be accessed. For example, if theuser assigned the name ‘Statistics’ to the Page Object and wanted toaccess the “Totals” property, the user would write script thatreferenced the name ‘Statistics.Totals.’ Note that the script needed toconstruct the “Statistics” object was generated by the Page Object DTCat design time.

As noted above, the server script may be different from the clientscript. Here, on the JScript proxy object is created for the server sideand one for the client side. These may be different since the methodsand properties accessible in each domain may differ. For example, ASPpage “Foo” contains three methods: A, B, and C. The developer makes Aaccessible on the client and server, makes B accessible on the server,and C accessible on the client. The resulting server proxy object wouldprovide A and B methods, while the client proxy object would provide Aand C methods. Using the term “exposed” in this example, the developerexposed A and B to the server and exposed A and C to the client.

Methods exported by the Page Object according to the invention areimplemented as server methods. As the enclosed document describes, thereare other methods associated with the Page Object which areautomatically available with the Page Object, but they are conventionalmethods which are available in the local ‘space’ (the document describesthe term ‘space’).

To simplify the programmer's task of navigating between pages,constructs such aswindow.location.href=page.asp?routing=shuffle&parameter1=value arereplaced by constructs such as page.navigate.shuffle (value), which aremore natural for a programmer.

Further, the editing environment may be modified to replace allscripting requirements with a “drag-and-drop” interface where each newobject is dropped into a page and, through the use of property andmethod pages, modified in accordance with the developers requirements.

In this case, the developer need never interact with the HTML; rather,the editor would convert the various objects intoclientside/serverside/ASPs scripts and pages as appropriate. The presentinvention may be implemented by any number of editors. Available editorsinclude, for example, Visual InterDev 98 and FrontPage 98 (by theMicrosoft Corporation).

These and other novel advantages, details, embodiments, features andobjects of the present invention will be apparent to those skilled inthe art from following the detailed description of the invention, theattached claims and accompanying drawings, listed herein, which areuseful in explaining the invention.

IV. BRIEF DESCRIPTION OF THE DRAWINGS

In the following text and drawings, wherein similar reference numeralsdenote similar elements throughout the several views thereof, thepresent invention is explained with reference to illustrativeembodiments, in which:

FIG. 1 is schematic diagram depicting a computing environment accordingto embodiments of the present invention;

FIG. 2 is a diagram of the various spaces according to embodiments ofthe present invention;

FIG. 3 is a diagram of how an object may move across spaces according toembodiments of the present invention;

FIG. 4 is a user interface for placing an object on a page according toembodiments of the present invention;

FIG. 5 is a state diagram for modification of an object across theserver/client boundaries according to embodiments of the presentinvention;

FIG. 6 is a representation of a first page treating a second page as anobject in accordance with an embodiment of the invention;

FIG. 7 is a flowchart illustrating the creation of a page in an editoraccording to embodiments of the present invention;

FIG. 8 is a flowchart illustrating a method of navigating to a new pageaccording to embodiments of the present invention;

FIG. 9 is a flowchart illustrating a method for executing a method on apage according to embodiments of the present invention;

FIG. 10 shows a variety of property pages associated with an object pageaccording to embodiments of the present invention; and,

FIGS. 11 and 12 show a property exchange feature according toembodiments of the present invention.

V. DETAILED DESCRIPTION

The present invention is described as it would be used for Internetapplications, which is one embodiment of the invention. The presentinvention, however, may be implemented generally within any number ofcomputer applications including any software development tool forauthoring text and computer-executable code. In the context ofdeveloping web pages, the present invention provides a tool forefficiently authoring hypertext markup language (HTML) text and script.In this context, the present invention may be implemented within anauthoring tool such as, for example, Visual C++, Visual InterDev andVisual J++ by Microsoft Corporation of Redmond, Wash.

As used herein, HTML script is intended to include the various scriptinglanguages available for execution on browsers. The actual scriptinglanguage used when converting from the following programming environmentinto the HTML environment may vary based on the browsers to which theHTML code is to be eventually sent. Since the language, JavaScript iscommon to both Internet Explorer 4® (from Microsoft® Corporation) andNetscape Navigator 4® (from Netscape® Corporation), this language may beused. Other languages be used supported by an increasing number ofbrowsers are also becoming available.

Although not required, the invention will be described in the generalcontext of computer-executable instructions, such as program modules.Generally, program modules include routines, programs, objects, scripts,components, data structures, etc. that perform particular tasks orimplement particular abstract data types. Moreover, those skilled in theart will appreciate that the invention may be practiced with any numberof computer system configurations including, but not limited to,distributed computing environments where tasks are performed by remoteprocessing devices that are linked through a communications network. Ina distributed computing environment, program modules may be located inboth local and remote memory storage devices. The present invention mayalso be practiced in personal computers (PCs), hand-held devices,multiprocessor systems, microprocessor-based or programmable consumerelectronics, network PCs, minicomputers, mainframe computers, and thelike.

A. Order of Description

In order to comprehend more readily the embodiments of the inventioncontained herein, the following lists the order of the contents of thedetailed description:

Terms;

General Purpose Computer;

Event Driven Server Model;

Object Lifetimes Exist Apart From Server;

Pages Treated As Objects;

Construction of Objects; and,

Summary.

B. Terms

The following terms are used throughout the specification to relate tovarious concepts. Four terms described below include design space,composition space, and interaction space. A space is generally anexecution environment for a document (or page). Here, the term documentis used interchangeably with a page. Traditional examples include aclient space and a server space in a client/server model. As many“spaces” may reside on a single machine, a space is therefore distinctfrom an operating system process alone.

1. Design Space

The design space is the environment in which a developer “designs” orcreates a document. The design space is generally a workstationseparated from a web server. When the designer has completed work on adocument, the document is saved to a web server (or generally a“server”).

2. Composition Space

The composition space is the environment generally resident on a server.In the World Wide Web model, when an end user requests a page ordocument from a server, the server packages HTML and/or additionalcomponents and transmits them to the waiting client. In some cases, theserver stores an active server page or an ASP (from the MicrosoftCorporation or Redmond, Wash.). ASPs are generally pages of script whichrespond to a browser's request for information. For example, a browseron a client may request all statistics from a given year for a baseballteam. The ASP has access to the desired statistics as stored in anaccessible database. In response to the browser's request, the ASPretrieves the desired statistics from the database, formats theinformation into HTML, and transmits the HTML to the waiting browser,where the resulting information is displayed. Here, as the server iscomposing the pages or documents for the client, the server is referredto as the composition space.

3. Interaction Space

The interaction space is the environment in which the client interactswith the received documents or pages, hence the term “interactionspace”. Two general types of clients exist: dumb clients and smartclients. The dumb client does not posses the capabilities of handing allinstructions or tasks as desired in a pure distributed processingparadigm. Specifically, the client cannot handle all events generated inthe interaction space and so needs to send them to the server to havethem handled by the server. The smart client, by contrast, has theability to appropriately hand the events generated locally on theclient.

In some cases, even the smart client does not have all informationavailable to it. For example, a designer may have elected when designinga document not to download all possible data sets as most would not beneeded by the smart client. By so doing, the designer saves bandwidthwhile requiring the smart client, like the dumb client, to ask foradditional information from the server. Client

4. Design-Time Control

Finally, the design time control is a control (for example, an ACTIVEX®control, of the Microsoft Corporation of Redmond, Wash.) that allows adeveloper to place text or script in a document that alters or enhancesthe operation of the document.

Design-time controls are similar to embedded wizards that can becontinuously edited to modify the text they generate for a web page.DTCs take advantage of OLE design-time capabilities (including directmanipulations, property sheets, and persistence) to capture user inputs,thereby extending the capabilities of an editor which supportsdesign-time controls. Additional disclosure of design-time controls isdescribed in U.S. Ser. No. 08/959,300, entitled “Method and Apparatusfor Automatic Generation of Text and Computer-Executable Code”, filed onOct. 28, 1997, the contents of which are incorporated for any and allessential subject matter.

A design-time control differs from a general control in that it operatesonly in an editor (or container) when a web site is being designed ormaintained. Once the web site is saved, the design-time control maycreate (among other things) script for the client or server/ASPs. As endusers are limited to a small number of browsers and using design-timecontrols to write multiple versions of the client/server script, thenumber of different clients' browsers and servers that can be supportedalmost limitless because each browser can be supported in one or moreDTCs.

C. General Purpose Computer

FIG. 1 is a schematic diagram of a computing environment in which thepresent invention may be implemented. The present invention may beimplemented within a general purpose computing device in the form of aconventional personal computer 200, including a processing unit 210, asystem memory 220, and a system bus 230 that couples various systemcomponents including the system memory to the processing unit 210. Thesystem bus 230 may be any of several types of bus structures including amemory bus or memory controller, a peripheral bus, and a local bus usingany of a variety of bus architectures. The system memory includes readonly memory (ROM) 240 and random access memory (RAM) 250.

A basic input/output system 260 (BIOS), containing the basic routinesthat help to transfer information between elements within the personalcomputer 200, such as during start-up, is stored in ROM 240. Thepersonal computer 200 further includes a hard disk drive 270 for readingfrom and writing to a hard disk, not shown, a magnetic disk drive 280for reading from or writing to a removable magnetic disk 290, and anoptical disk drive 291 for reading from or writing to a removableoptical disk 292 such as a CD ROM or other optical media The hard diskdrive 270, magnetic disk drive 280, and optical disk drive 291 areconnected to the system bus 230 by a hard disk drive interface 292, amagnetic disk drive interface 293, and an optical disk drive interface294, respectively. The drives and their associated computer-readablemedia provide nonvolatile storage of computer readable instructions,data structures, program modules and other data for the personalcomputer 200.

Although the exemplary environment described herein employs a hard disk,a removable magnetic disk 290 and a removable optical disk 292, itshould be appreciated by those skilled in the art that other types ofcomputer readable media which can store data that is accessible by acomputer, such as magnetic cassettes, flash memory cards, digital videodisks, Bernoulli cartridges, random access memories (RAMs), read onlymemories (ROMs), and the like, may also be used in the exemplaryoperating environment.

A number of program modules may be stored on the hard disk, magneticdisk 290, optical disk 292, ROM 240 or RAM 250, including an operatingsystem 295, one or more application programs 296, other program modules297, and program data 298. A user may enter commands and informationinto the personal computer 200 through input devices such as a keyboard201 and pointing device 202. Other input devices (not shown) may includea microphone, joystick, game pad, satellite dish, scanner, or the like.These and other input devices are often connected to the processing unit210 through a serial port interface 206 that is coupled to the systembus, but may be connected by other interfaces, such as a parallel port,game port or a universal serial bus (USB). A monitor 207 or other typeof display device is also connected to the system bus 230 via aninterface, such as a video adapter 208. In addition to the monitor,personal computers typically include other peripheral output devices(not shown), such as speakers and printers.

The personal computer 200 may operate in a networked environment usinglogical connections to one or more remote computers, such as a remotecomputer 209. The remote computer 209 may be another personal computer,a server, a router, a network PC, a peer device or other common networknode, and typically includes many or all of the elements described aboverelative to the personal computer 200, although only a memory storagedevice 211 has been illustrated in FIG. 1. The logical connectionsdepicted in FIG. 1 include a local area network (LAN) 212 and a widearea network (WAN) 213. Such networking environments are commonplace inoffices, enterprise-wide computer networks, intranets and the Internet.

When used in a LAN networking environment, the personal computer 200 isconnected to the local network 212 through a network interface oradapter 214. When used in a WAN networking environment, the personalcomputer 200 typically includes a modem 215 or other means forestablishing a communications over the wide area network 213, such asthe Internet. The modem 215, which may be internal or external, isconnected to the system bus 230 via the serial port interface 206. In anetworked environment, program modules depicted relative to the personalcomputer 200, or portions thereof, may be stored in the remote memorystorage device. It will be appreciated that the network connectionsshown are exemplary and other means of establishing a communicationslink between the computers may be used.

D. Event Driven Server Model

The conventional web server model, active server page/cgi model, is asequentially executing set of code. For designers, the conventional webserver model is confusing at best because designers are generally morecomfortable with event driven models. For example, the conventional wayof coding a server includes the steps of sequentially code each line toretrieve and operate on information. To sequentially code an ASP, thedesigner must have a secure grasp of what each and every component inthe ASP performs as well as how the components interrelate. A developermust be an expert in code and in script. To this end, the linearprogramming approach results in embedded HTML code in the ASPintermingled with logical script. The resulting ASP and sets of ASPs canbecome harder to organize and comprehend. Further, this text-streamingapproach to authoring does not work well in the WYSIWYG (what you see iswhat you get) environment as the standard ASP becomes increasinglydifficult to parse into different colors for an increasing number ofdifferent elements (server script, client script, server script whichgenerates client script, comments, text, and the like). Moreover, adesigner needs to readily comprehend the subtle differences betweenclient script and server script and the interaction between them.

As shown in FIG. 2, one aspect of the present invention relates toalleviating the designing difficulty associated with the designing ofdocuments that are transported across the server/client transition. FIG.2 shows design space 1001 outputting a document or documents 1007 thatare stored in composition space 1002. While composition space 1002remains a serial execution environment 1005, the present inventionprovides an event driven model 1006 to ride on top of the serialenvironment 1005 so as to present the appearance of an event drivenmodel to the designer when designing in the design space. Accordingly,the designer may write code and script in the design space as theyrelate to each other in event driven relationships, while the underlyingparadigm for the server as serially executed remains conventional.

As also shown in FIG. 2, interaction space 1003 exists across theserver/client transition 1004. The conventional model requires in-depthknowledge of the differences between the two scripting environments 1002and 1003. By using the event-driven model of the present invention, thedistinction between the two scripting environments 1002 and 1003 is kepthidden from the designer, which in turn allows the designer toconceptualize the combination of the composition space 1002 and theinteraction space 1003 as a single unified environment. This singleenvironment makes the designer's task easier by allowing the event modelof the present invention to handle the scripting and coding for thecomposition side 1002 and the interaction side 1003 of the division1004.

An outgrowth of the event model as shown in FIG. 2 is the representationof conceptual objects moving between the various spaces. FIG. 3 showsthe design space 1001, composition space 1002, and interaction space1003 as related to FIG. 2 and including object O_(A) 1009. The conceptof Object O_(A) 1009 placed on a document is created in design space1001 and ported to composition space 1002 through transition arrow 1010.When requested by a browser in the interaction space 1003, theconceptual object O_(A) 1009 moves through transition arrow 1011 to theinteraction space 1003. For further modification or event handling,conceptual object O_(A) 1009 moves through transition arrow 1012 back tocomposition space 1002 based on an action or event having occurred ininteraction space 1003. While in the abstract, object O_(A) 1009 movesintact between the various spaces 1001, 1002, and 1003, this abstractionis referred to as a conceptual object as the designer may simplisticallyview the object as moving between spaces while the event model handlesthe complex coding to create the simplistic appearance of thetransitioning object. The complex coding underlying the event model andthe representation of an object moving between spaces is treated ingreater detail below.

Programmers are generally accustomed to the Visual Basic programmingmodel where a designer constructs a form as containing objects withassociated methods, properties, and events. Next, the designer writesVisual Basic code against the object to cross-link the object with otherobjects on the form or application. In the conventional web model,objects are not used, but rather each page is serially written forplacement on the serial execution server. To alleviate the programmingdifficulties for the designer, one aspect of the invention provides auser interface that supports the inclusion of objects in a document asbeing “dragged-and-dropped” into position on the page. For example,referring to FIG. 4, a text box object is to be included on a page.Array 1020 shows a grouping of objects that may be incorporated intopage 1021. In this example, text box object 1022 is selected from array1020 and dropped into position on page 1021. Surrounding depositedobject 1023 is HTML code 1024. In one presentation of page 1021 to thedesigner, while the page 1021 is in design space, the representation oftext box 1023 is not a listing of HTML code, but rather a visualrepresentation of the text box (in this example, a box with text in it).Next, once the text box 1023 is on the page, the designer may assignproperties to the text box 1023, perform various methods on the text box1023 or on the contents of the text box 1023, and assign relationshipsbetween other objects on page 1021 and text box 1023.

This hiding of the code of the text box allows the designer to be freefrom the encumbrances of confusing amounts of code layered upon codelayered upon more code. Also, by not having the code for the text box1023 fixed by using a DTC, the DTC may respond to subsequent changeswithout having to be reconfigured for the page.

In one aspect of the invention, text box 1023 may be a design timecontrol that inherits information from its inclusion on page 1021 andwhere it is included on page 1021 to create server/client script for thepage when stored in the composition space. The server/client script asstored in the composition space 1002 may have the actual HTML code forthe text box or it may generate the HTML code to represent the text boxobject 1023 based on information received from the interaction space1003. In these two representations, if the HTML code is fixed in thecomposition space, then the representation of the text box may not bealtered by subsequent interactions in the interaction space 1003.However, if the composition space 1002 has a representation of text box1023 and the representation 1023 is responsive to data received fromanother source or retrieved from the server, then the text box may berecomposed in the composition space 1002 to conform to the receiveddata.

Through the use of DTCs, it is now easier to write applications forserver script or client script. In on aspect of the invention, aproperty value can be set, in this case, whether to be scripted on theserver or scripted on the client for the handling of an event. Thedecision where to send scripting is made at design time. In this case,the ability to set the scripting location (of to what space the scriptis directed) provides a number of advantages. In particular, the DTC maybe programmed with the appropriate scripting information so that whencreating code, the DTC can place the appropriate code in the correctlocation, alleviating this tedious coding task from the designer.

Also, another advantage in using DTCs to promote the programming objectmodel is in linking the various controls in script is made easierthrough the use of DTCs. For example, the same code for an object cannotbe used in both the client and server. Rather, the client code shouldsend the event to the server code and the server code should handle theevent. So, the designer is faced with two runtime environments. Whileboth are performing related operations, the server code and client codeneed to interact so as to produce a unified result. In accordance withthe present invention, a DTC does not know what type of environment itwill be placed. Only when configured in design space and saved to theserver does the DTC operate to instantiate the correct scripting inorder to accomplish the goals of the original object. In the case, wherethe DTCs are configured to handle the events on the server, this may bereferred to as server binding as the event handling is bound to theserver. When the events are to be handled by the client, for example, inDHTML, this may be referred to as client binding as the event handlingis bound to the client.

Another advantage of DTCs is that one can set a DTC to inherent part ofits properties from the page that it is located. For example, if thepage is intended to be a client-bound page, a designer need only dropthe DTC onto the page in the design mode and allow the DTC to configureitself in accordance with the properties of the page in which it isplaced. Alternatively, the designer may want to specify the DTCsseparately, as some event handlings are more appropriate for the serverand others for the client.

It is noted that the composition space/interaction space objects existapart from the DTCs. DTCs are not required to implement the features ofinstantiating an object. Rather, one can include a variety of objectsincluding use their methods, define their properties, and write scriptagainst them without using DTCs. An example of the use of object withoutthe use of DTCs is through the existence of scripting libraries.Scripting libraries, also covered in greater detail below, areaccessible libraries of script which allow one to include the objectsfrom the library in a page without using DTCs. While the end page may beidentical in the composition space or interaction space to one createdthrough the use of a DTC, the DTC provides an abstraction from thetext-streaming approach to creating pages to that of using a VisualBasic-type interface to drop objects on a page and define their methodsand modify their properties on property pages and method pages ascontrolled by the DTCs.

E. Object Lifetimes Exist Apart from Server

The objects addressed above conceptually move from space to space asshown in FIG. 3. While in some instances, the actual representation ofthe object may exist in the composition space 1002 (for example, aserver object), the conceptual object moves between spaces. To highlightthe features and operations of objects as they move between the variousspaces, FIG. 5 provides an example.

FIG. 5 shows composition space 1002 and interaction space 1003 asincluding a non-volatile memory 1030 in at least one of the two spaces1002 and 1003. An ASP page 1045 containing objects is stored innon-volatile memory 1030. The ASP page 1045 includes objects balloon,cube, and slab. These objects may have associated methods andproperties. In response to a request from a browser in interactionspace, the ASP page 1045 executes and instantiates (step 1031) theobject “balloon” with stored property information from non-volatilememory 1030 so as to create balloon₁ 1032. Balloon₁ 1032 is thentransmitted (step 1033) to interaction space 1003 and appears asballoon₁ 1034 with persistence information 1035. In this example, theobject balloon₁ 1034 is transmitted with its own code to interactionspace 1003. The persistence information 1035 that accompanies balloon₁1034 describes the properties of received balloon₁ 1034. Here, theproperties are (object number=1, color=red, radius=5). Next, in theinteraction space 1003, the browser receives an event 1036 (for example,a request to paint the balloon₁ 1034 blue). The balloon₁ 1034 has notchanged but, having received event 1036, is identified as balloon₁ 1035.The browser transmits (step 1038) the event 1036 to the compositionspace to handle the event. The information transmitted to thecomposition space 1002 include the event 1036 (paint blue) and thepersistence information 1035 which identifies the balloon₁ 1035 to theASP in composition space 1002. Next, the ASP re-instantiates (step 1039)the object balloon₁ as 1041 and handles the event 1036 (paint blue) instep 1040. The object balloon₁ is transformed into balloon₂ 1042. TheASP then transmits balloon₂ 1042 (in step 1043) back to the interactionspace 1003 with persistence information (object=1, color=blue, radius=5)1045. Finally, the balloon₂ is received as balloon₂ 1044 and displayedto user. In this example, it is noted that at least one advantage ofstoring the persistence information in the interaction space 1003 isthat the interaction space is the best place to maintain thisinformation.

When scaled for multiple users, the composition space would quickly beoverrun by the significant amount of storage information required to besaved to as to remember the exact properties (also known as stateinformation) of each object transmitted to a browser. The persistenceinformation may be placed in each downloaded page at, for example, atthe bottom of the page in a hidden field such as <input TYPE=HIDDENNAME=“balloon” VALUE=“blue”>. Alternatively, a designer may use cookiesto perform similar state monitoring and persisting.

In one embodiment of the present invention, part of the operation ofFORM elements is the need for specification of page methods to invokewhen a FORM is POSTed to the page. A convention exists where DTCs on thepage create their normal FORM field of a given name, and they alsocreate a HIDDEN FORM field, which relates to the normal field name. Thefollowing is an example of the technique:

<INPUT TYPE=SUBMIT NAME=Cancel> <INPUT TYPE=HIDDEN NAME=Cancel_MethodVALUE= “CancelRequest”>

When this FORM is POSTed back to its original ASP file, the codegenerated by the Page Object DTC sees the Cancel field in the POSTinformation and look for the Cancel_Method field. If it finds such afield, it will use its value to determine which routine on the serverpage to invoke.

In the above case, the Page Object DTC becomes part of a scripting modelthat allows a developer to write code against the page.

Alternatively, it is contemplated that the initial instantiation (step1031) may occur without a request from a browser, for example, for thepurposes of broadcasting or multicasting using a push web model.

Another example relates to reducing the size of a text box as displayedon the client every time a user makes a selection. As this example issimilar to the states of FIG. 5, a new figure is not shown. First, theobject is created on the server and its length is set to 10. Next, theobject is sent to the client with the persistence informationidentifying the object and identifying the length of the boxes at 10.The client clicks a button, sending an onclick event to the browser. Thebrowser sends the onclick event with the persistence informationidentifying the object and the length (10) back to the server. Theserver reinstantiates the object, modifies its length, and sends it backto the client with new persistence information (object id, length=9),and the process repeats. Note here that, as above with the balloon, theserver does not need to remember what object the client has as well asthe properties of the object as the client may provide this informationback to the sever with each event firing. To this end, therepresentation of the object and all state information as modified bythe events is not stored on the server, but instead discarded as theclient has this information.

Further, the client does not need to retransmit the entire object backto the server for event handling. Rather, the client may transmit theidentification of the object as the server has the re-instantiationinformation stored in non-volatile memory 1030.

It should also be noted that the type of code for the server and clientmay be different. For example, the server may run JavaScript or may runC++. So, the object may not only move seamlessly between spaces but alsobe translated to different scripting languages appropriate for eachspace (for example, JavaScript in the composition space and HTML in theinteraction space). Also, it should be noted that no user interface isneeded in the composition space. Rather, the only user interface neededis in the interaction space as there is generally no user visuallymonitoring the instantiation of objects in the composition space. Thismonitoring is done on in the interaction space. In the above examples,all event handling was destined for the composition space. As the smartclient may in corporate some event handling, other implementations mayhave the client handling at least some events.

F. Pages Treated as Objects

Another aspect of the present invention is the paradigm of pagesimplemented as objects. Page Objects may be used in conjunction with ASPpages. In this sense, a page may have methods and properties associatedtherewith. Also, by considering a page as an object, a developer canhave a first page use a second page as if the second page were an objectwith associated methods and properties. To this end, the developer'sconception of a web project is translated to look more like a collectionof objects than a set of independent ASP pages. To this end, thecollection of objects appears to someone familiar with traditionalprogramming techniques as a collection of objects. The invention alsoincludes the use of standard web authoring and interaction techniques toprovide that same programmer with familiarity for inter-documentinteractions.

The page object aspect of the invention furthers the perception that thecomposition and interaction stages of a document's lifetime are part ofa single object. Instead of hopping from document to document, a singledocument is repeatedly composed and interacted with (it repeatedlyvisits the composition and interaction spaces). The ability to ‘hop’between documents is retained, but that capability is presentedconsistent with the object-based metaphor that is familiar toprogrammers.

Central to the object-based metaphor is the notion that a document has aname and that it has methods and properties. Methods may be implementedin either the local space or in the composition space. Methods which areimplemented in the composition space are available for use in bothcomposition and interaction spaces (e.g. navigate methods). Methodsimplemented in the local space are only available in the local space(e.g. getState/setState). Properties are available in both compositionand interaction spaces.

As the conventional web custom composition of a page is confusing, thepage object aspect of the invention clarifies the means for customizingpages by standardizing on traditional programming techniques. Theexistence of a method on a document is a means of requesting customcomposition of a page. The method is called, standard web techniques areemployed, and the page is recomposed according to the instructions inthe method. The invention ensures that this appearance of ‘calling amethod’ is maintained for the author of the document, to the point ofpermitting by-value parameters to be passed to the method.

Also, as the conventional method of maintaining data associated with aweb document is also confused, the page object aspect of the inventionclarifies the means by again standardizing on traditional programmingtechniques. The existence of a property on a document is a means ofstoring data in association with that document. At least this aspect ofthe invention ensures that the appearance of accessing a property on thedocument is maintained for the author of the document. This aspect ofthe invention also ensures that the property value is maintained, isaccessible and is modifiable in both composition and interaction spaces.

Given the above, a document generally begins life in the compositionspace where it is initially composed (having been placed there by adesigner working in a design space). Next, the composed document ismoved to the interaction space. If the interaction requiresrecomposition of the page (invocation of a document method), thedocument is moved back to the composition space where it is recomposed(as discussed above with respect to FIG. 5. The recomposed document ismoved back to the interaction space. This process repeats as many timesas is dictated by the document and the user interactions with thedocument.

A refinement of the overall model is that the composition andinteraction spaces can be implemented in a single process and that avariety of the interoperations between the two spaces become nulloperations. Thus, through the use of page objects, the composition spaceand implementation space may be considered as a single space.

The page object model of the invention also provides a means by whichone document may request a transfer of execution to a differentdocument. This is accomplished by having one document reference anotherusing the invention at design time in the design space. The referencepermits the author to gain access to the methods of another documentfrom the current document. When the document is executing in either thecomposition or interaction spaces, it is possible for the document toinvoke a method implemented in a referenced document. When this happens,the referenced document becomes the new document that passes between thecomposition and interaction spaces. Because a method is employed,by-value parameters may be used to pass information between thedocuments. When the change between documents takes place, the originaldocument is discarded after saving the appropriate state information.

FIG. 6 is a representation of a first page treating a second page as anobject. “Page 1” 101, with the file name of page1.html, includes button102. When button 102 is selected, “Page 2” 103, with the file namePage2.asp is accessed. For instance, page2.asp may be an active serverpage which accesses a database, retrieves a statistics on a person,creates an HTML page to display the statistics, and transmits the HTMLpage to the requesting browser. An example of the HTML representation ofthe script behind the button is as follows:

<input name=button value=“press me” onclick=“page2.show( )”>

In the prior art, the HTML developer would have been forced to refer topage2.asp as a standard page. For example, the onclick parameter wouldhave been represented as follows:<onclick=“window.navigate.href=/windows/webpage2.asp”>

accessing page2.asp as stored in the windows/web directory. Thedifficulty experienced in referring to page2.asp as a new destination isthat the coding for the developer becomes increasingly complex withnumerous ASP files (the names remembered of whose files must be) andthat each ASP had to be selected separately. If two ASP files wererelated and only differed in a few ways, for example, if the differed interms of the number of fields that were searchable, then the two fileswould have to be coded completely independently of each other.

The addressing scheme of the present invention alleviates the previousaddressing difficulty by allowing pages to be treated as objects(meaning that each page has its own transportable properties and methodsassociated with it) as well as objects being defined on the addressedpages themselves. In accordance with the invention, instead of requiringdeveloper to separately code a new page 103 for each new button 102, thedeveloper can embed objects in page2.asp and address the objectsindividually. In this regard, the developer may refer to the “show”method of page2.asp directly in the HTML code of page1.html byconsidering page2.asp to be an object with “show” as one of its methods.

Referring to the ASP page as an object is referenced herein as an “ASPObject”. ASP object methods may be are implemented as standard scriptmethods. They may be implemented in any supported scripting language.All methods are implemented as server methods, and as a result, requirethat the browser navigate to the page that implements the method. Tomake this clear to the developer, all exported methods are availablewithin a subobject on the page called ‘navigate’. This produces aninvocation syntax that looks like:page.navigate.method(p1, p2, etc)

As will be treated in greater detail below, the programming userinterface may present a list of all available methods available on atarget page. In order for programming model UI to present a list ofavailable methods, a Page Object DTC (placed at the top of each pageobject) scans the page for content when the page is refreshed oraccessed and parses the uncovered methods to eventually create a list ofscript content in the page. From this parsing, the DTC provides ascripting model against which one can write code as including themethods found on that page. Next, this knowledge of a Page Object DTCmay be accessed by other pages. For example, if a developer is adding areference to page2 from page1, the developer is interacting with the DTCon page1. When the reference (to page2 from page1) is added, the page1DTC will examine the contents of page2, and locate the Page Object DTCinformation in that file. Next, it will instantiate the page2 PageObject DTC and retrieve from it a list of its object model elements.

As will be described with respect to FIG. 7, the developed page 1 101 isconverted from the object-oriented programming environment into an HTMLenvironment so as to be compatible with the various servers and clientsto which page 1 101 is to be eventually sent. To this end, theopportunity for a developer to design in one environment, with thecreated pages later converted into a less-friendly HTML environment,enables the developer to relate scripts in a natural, object-orientedway, while preserving all functionality afforded by HTML script to endservers and end users.

An example of how the functionality of page 1 101 and page 103 may beimplemented is as follows. The developer can place the functionpage2.show(“Bob”), assuming one wants to look at an image of Bob, on theclient's page. When interpreted into HTML script, the following wouldreside on the client's page:

<onclick=“window.navigate.href=file://c:\windows\web\page2.asp?name=Bob”>.

This representation is invisible to the client; the client only sees thebutton with the label “press me”. Once pressed, the active server pagereceives the request for Bob's image in a recognizable format. Thisrepresentation is also invisible to the developer; the last call thedeveloper saw for this function was page2.show(“Bob”). Since theconversion is invisible to the developer and end user, all aspects ofthe HTML standard (for example HTML 4.0) may be exploited withoutmodifying the standard to accommodate the enhanced developmentobject-oriented interface. A similar implementation is available forposting data via the POST feature of HTML, which sends back name-valuepairs to the active server page.

The posting of the string ‘Bob’ is accomplished by composing a URL forthe overall method invocation (e.g. page2.navigate.show(‘Bob’) mightbecome ‘Page2.asp?_method=show&pcount=1&p0=Bob’) and the URL is placedinto a hidden field on the page. The hidden field is represented by theHTML “<INPUT TYPE=HIDDEN NAME=_method>”. Setting the value of thathidden field is represented by the script“document.thisForm._method.value=‘Page2.asp?_method=show&pcount=1&p0=Bob’”.Posting the information is accomplished by submitting the form elementon the HTML page. That is accomplished via the script“document.thisForm.submit( )”. When the submit method is invoked ondocument.thisForm, all HTML input elements' names and values arecollected together and sent in the form of an HTTP POST request to thedestination URL. In this case, the destination URL may generally be thecurrent page. The browser next re-requests the current page by sendingthe POST request, and the current page then unpacks the submittedinformation and decides what to do with the unpacked information. If thecurrent page determines that “_method name” is represented in thatinformation (because the _method hidden field had its value set beforethe POST), then the page will tell the browser to navigate to the URLindicated by the _method value. In this case, the new page is“Page2.asp?_method= . . . ”. The browser sends a GET request to theserver, asking for the content associated with that URL, and the servercomposes the page and sends it to the browser. By using the page objectmodel of the present invention, a developer is shielded from coding therelationships. Rather, by using the page object metaphor, the designerwrites code to methods in pages and the scripted interaction, asdescribed above, is isolated from the detailed coding required to makedetailed ASP pages work.

The implementation of the page2.navigate.show method on the clientperforms all the work leading up to document.thisForm.submit( ). Also,if a navigate is performed on the server, a POST is not performed. Thereason for the POST is to carry the state information being maintainedabout the page from the client to the server, thus keeping intact theillusion of a single object which exists in either the composition space(the server) or the interaction space (the browser). So in the case of aserver-side navigate method call, a POST is not necessary because thepage state information does not need to go anywhere. When the method isinvoked, the page cleans itself up by navigating to a new page.

FIG. 7 is a flowchart illustrating the creation of a page in an editor.In this example, the developer is editing pagea.asp. Pagea.asp has adesign-time control Page Object that provides a number of propertypages, including, for example, a general property page, a methodsproperty page, a properties property page, and a reference propertypage. In this example, the general property page of pagea.asp mayinclude the name of the pagea.asp (in this case, “apple”). Accordingly,pagea.asp may be referred to as “apple” by other pages. For a showmethod on “apple”, it may be referenced as apple.show( ).

To allow one page to access a second page's methods and properties, thefirst page creates a reference to the second page. The reference causesthe client and server script to be added to the first page, which willinstantiate the desired proxy objects (as predefined in the second page)upon execution of the first page. In particular, when the reference isadded, the design-time control of the first page, in one embodiment,locates the design-time control of the second page. Next, the firstdesign-time control instantiates the second page's design-time controland ask for a description of the second page's objects. The informationreturned from the second page's design-time control is finallyincorporated into the first page's design time control.

The constructor code (a code which is placed into one file that acts asa proxy for another file) assists with the use of the page object model.The constructor code (may be referred to by the nomenclature xxxxx-ctor)enables a proxy representation of the target page in the current page sothat the designer can reference the objects of the target page.

Note that the current implementation is set up such that if Page1.asp isa page object, then it contains specially formatted text (known as XML)which describes the page as an object. At design time, another pagewhich is loaded into the editor (and, therefore, has live Design TimeControls in it) can inspect the contents of Page1.asp to determine whatits methods and properties are and allow other pages to have codewritten against it.

These property pages are described in detail in FIG. 10, below. Inaddition to the provided property pages mentioned above, it isrecognized that additional property pages may be added as needed toincorporate other object information or other non-object information foreach page. Likewise, property pages can be deleted when the environmentdoes not need every separate page.

While editing “apple” in step 301, the developer references pageb.asp(step 302). Noting that pageb.asp does not exist, the editor createspageb.asp in step 303. Created pageb.asp is shown as page 310. Afterstep 303, the editor inserts a Page Object DTC 311 into pageb.asp 310 instep 304. Next, if possible, the editor can attempt to populate thefields of the various property pages of new pageb.asp. Otherwise, theeditor prompts the developer to describe the various methods andproperties (and other information) relevant to pages (step 305). Theeditor may then prompt the developer for objects 312 (with methods eat,sleep, fly) to be included on page 310 (step 306). For the inclusion ofobjects, the developer may drag-and-drop in old objects to create a newcollection of objects on the page 312. As indicated by dotted lines,next step may be included to describe the methods and properties of eachnew object 312 on the page 310 (step 307). The developer then proceedsto save the modifications made to the various pages (pagea.asp,pageb.asp) (step 308). The editor processes the DTCs to createappropriate scripts in new client and server pages and ASPs (step 309).

While FIG. 7 relates primarily to creating a new page with new methodsand properties, it is clear that creating a new page from existing pagesis similar. In creating a new page from existing objects, oneincorporates the existing objects into the current page. The editorperforms most of the functions of incorporating the referenced objectsinto the new page. For example, all object properties and methods may beentirely incorporated. Alternatively, the editor may step the developerthrough each method and property of the new object to allow thedeveloper to modify the properties and methods as they are incorporatedinto the object of the new page. An HTML example of a new ASP file is asfollows:

[scripting model start code] [Page Object DTC] <HTML> <HEAD> <METANAME=“GENERATOR” Content=“Microsoft Visual InterDev 1.0> <METAHTTP-EQUIV=”Content-Type content=“text/html; charset=iso- 8859-1”><TITLE>Document Title</TITLE> </HEAD> <BODY> <!--HTML is insertedhere--!> </BODY> </HTML> <% scripting model end code %>

In this example, the call to the EndPageContent( ) method terminates thepage.

This page will eventually contain, or be referred to as, an object. Toexplain how the objects between pages can interrelate, the interactionswith respect to methods and properties are now described.

First, methods may be implemented as standard script models in anysupported scripting language. Methods may interact in one of two ways:the method may require navigation to a new page or may be executed inthe background and keep the end user's browser on a given page. FIGS. 8and 9 describe these processes in detail from the browser's perspective.

FIG. 8 shows the receipt of a page in step 401. Next, the end userselects a method with the name of <foo.navigation.method( )> (relatingto file foo) in step 402. The browser unloads the current page (step403), grabs the new page foo with its method (step 404) and runs the newpage (405).

FIG. 9 relates to the execution of a method with no new navigation inthe client's browser. FIG. 9 shows the receipt of a page in step 501.Next, the end user selects a method with the name of <foo.execute.method( )> in step 502. In contrast to step 403, the browser keeps the currentpage (step 503), and grabs the new page (504), which accesses the methodmethod. Finally, while the method method may be running elsewhere (or itmay be running on the client), the client's browser receives the datagenerated by the method and returns them to the currently running page(505). To the extent that information is displayed by the new method,the method effectively appears to run in the current page.

FIG. 9 may be understood with relation to the following example: abrowser has downloaded a page with various fields for entry of variousbaseball players' names along side a reserved field. The end user nextselects the name of player Bob and transmits “Bob” to the server storingBob's information. Instead of dumping the current page with the fieldbearing the data “Bob”, the browser keeps the current page and populatesthe reserved field with the new information (for example, Bob's battingaverage). Before the current invention, previous web page developers hadto create complex cookie sets for storing the entered informationlocally then repopulating cleared fields with cookie information.Alternatively, previous web page designers had to store the uploadedfields on a server temporally, repackage the stored information into anew page with the retrieved information, and download the combined webpage. To this end, developers were hampered by the complex temporarydata storage tasks needed to handle even the smallest of queries. Withthe present invention, the temporary storage problem is minimized, ifnot eliminated.

FIG. 10 shows how the property pages may be ordered in a DTC page object602 of a page 601. The DTC 602 supports three property pages: a methodsproperty page 604, a properties property page 605, and a referenceproperty page 606. Each property page has information that can betoggled according to the developer's wishes.

The method property page 604 indicates that page 601 contains threemethods in it. The methods include “eat”, “sleep”, and “fly”. Theproperty page 604 also indicates where the methods may be exported. Theexportation and the accessibility may be switched between choices. Forexample, the eat method may be exported to both the server and theclient, the sleep method may be exported to the client only, and the flymethod may be exported to the server only. Also, the eat method may beaccessible from both the client and the server, the sleep methodaccessible from the client only, and the fly method accessible from theserver only.

As used herein, being “exported” means that a method (implemented withinthe page on the server) should be accessible in some way either on theclient or on the server. Being “accessible” from the client or theserver means that contributions to the namespace of either the client orthe server appear so that the method can be called from the client orthe server. In particular, a proxy method is provided and is callablefrom script, which will navigate or redirect a browser to the properURL.

One example of the implementation simply allows the designer to export amethod. As disclosed herein, the method may be accessible from bothclient and server. An example of this accessibility is for the user toimplement a “fly” method, go to the Page Object Methods property page,and add that method to the Navigate Methods grid. On the page, scriptcan then call “thisPage.navigate.fly” in both the composition (server)and interaction (browser) execution spaces. Note, the first four linesthrough “%>” represent an example of the scripting model start code.

<%@ Language=VBScript %> <% ‘ VI 6.0 Scripting Object Model Enabled %><!--#include file=“_ScriptLibrary/pm.asp”--> <% if StartPageProcessing() Then Response.End( ) %> <FORM name=thisForm METHOD=post> <HTML> <HEAD><META name=“VI60_DTCScriptingPlatform” Content=“Client (IE 4.0 DHTML)”><META NAME=“GENERATOR” Content=“Microsoft Visual Studio 6.0”> <SCRIPTLANGUAGE=vbscript RUNAT=Server> Sub fly( ) ‘ do nothing End Sub</SCRIPT> </HEAD> <BODY> <!--METADATA TYPE=“DesignerControl” startspan<OBJECT classid=“clsid:8CC35CD6-E98B-11D0-B218-00A0C92764F5”id=PageObject1 style=“LEFT: 0px; TOP: 0px”>   <PARAM NAME=“ExtentX”VALUE=“4233”>   <PARAM NAME=“ExtentY” VALUE=“1508”>   <PARAMNAME=“State” VALUE=“(ObjectName_Unmatched=\qPatent\q,NavigateMethods=(Rows=1,Row1=(Name=\qfly\q, Parameters_Unmatched=\q0\q)),ExecuteMethods=(Rows=0),Properties=(Rows=0),References=(Rows=0))”></OBJECT> --> <SCRIPTLANGUAGE=JavaScript RUNAT=SERVER> /* VIPM PAGE DESCRIPTION <DSCNAME=“Patent”>  <OBJECT NAME=“navigate”>  <METHOD NAME=“fly”SCENARIOS=“CLIENT,SERVER”/>  <METHOD NAME=“show”SCENARIOS=“CLIENT,SERVER”/>  </OBJECT> </DSC> VIPM PAGE DESCRIPTION */</SCRIPT> <% Sub [_PO_OutputClientCode]( ) %> <SCRIPTLANGUAGE=JavaScript> if (typeof Patent_onbeforeserverevent == ‘function’|| typeof Patent_onbeforeserverevent == ‘unknown’)   thisPage.advise(‘onbeforeserverevent’, ‘Patent_onbeforeserverevent ( )’); Patent= thisPage; Patent.location = “Patent.asp”; Patent.navigate = newObject; Patent.navigate.fly = Function(‘thisPage.invokeMethod (“”,“fly”, this.fly.arguments);’); Patent.navigate.show =Function(‘thisPage.invokeMethod(“”, “show”, this.show.arguments);’);</SCRIPT> <% End Sub %> <SCRIPT LANGUAGE=JavaScript RUNAT=SERVER>function _PO_getClientAccessor(serverValue) {   if (serverValue == null)    return ‘null’;   return ‘unescape(“‘ + escape(serverValue) + ’”)’; }function _PO_ctor( ) {   thisPage.getClientAccessor =_PO_getClientAccessor; Patent = thisPage; Patent.location =“Patent.asp”; Patent.navigate = new Object; Patent.navigate.fly =Function(‘return fly( );’); Patent.navigate.show = Function(‘return;’);  thisPage._objEventManager.adviseDefaultHandler(‘Patent’, ‘onenter’);  thisPage._objEventManager.adviseDefaultHandler(‘Patent’, ‘onexit’);  thisPage.registerVTable(thisPage.navigate, PAGE_NAVIGATE); } function_PO_dtor( ) { if (thisPage._redirect == ‘’)   _PO_OutputClientCode( ); }</SCRIPT> <!--METADATA TYPE=“DesignerControl” endspan--> <P>&nbsp;</P></BODY> <% ‘ VI 6.0 Scripting Object Model Enabled %> <%EndPageProcessing( ) %> </FORM> </HTML>

The following sample of the above allows both the server and client toaccess the method.

<DSC NAME=“Patent”>  <OBJECT NAME=“navigate”>  <METHOD NAME=“fly”SCENARIOS=“CLIENT,SERVER”/>  <METHOD NAME=“show”SCENARIOS=“CLIENT,SERVER”/>  </OBJECT> </DSC>

As with the methods property page 604, the properties property page 605shows various characteristics of the properties. Here, three propertiesare on page 601: run, walk, and jog. The attributes include the type ofproperty (session, page or application), the type of access (read-only,read/write), and to where the property exported/accessed. Other objectsmay not be contained within page 601. However, they may be referencedvia placement in the reference page 606. To include an object in thepage, the developer may drag and drop an object into the reference pageand have all methods and properties included automatically. Finally, thegeneral property page 603 relates to general information about page 601(for example, its name).

FIGS. 11 and 12 show a property exchange feature according toembodiments of the present invention. A property may be declared by thedeveloper as being part of the ASP object, while its value may be storedin a server-side location. Alternatively, the values of the property maybe stored in said ASP object itself.

FIG. 11 shows an ASP proxy object 704 located on server 701 and an ASPproxy object 705 located on a client 702. When an ASP object is loadedby a server, the property values are retrieved 706 (from wherever theyare stored 703) and are placed into the proxy objects properties 704.Also, the proxy object's properties for the client are prepared andstored in ASP object 704 as well. During construction of the page, theproxy objects' properties may be accessed and modified by the serverscript. If modified, the properties may be sent back to the data storage703 for future retrieval.

When the page is delivered to the client 702 by data flow 707, the pageproperties are transmitted to the client as well. Generally, theproperties of the objects sent to the client are marked read-only(meaning that server 701 will not accept any modifications of theproperties from the client 702). The read-only status was previously setby the developer in the properties property page 605 of FIG. 6.

FIG. 12 relates to the posting of modified property information back todata storage 703. If the page property is marked read/write, themodified property is transmitted back to server 701, for example, by theclient navigating to a new page or by posting 801 its data to the newpage. Once the new page on the server receives the updated information,the modifications are combined and transmitted 802 to data storage 703.

In general, a page property is referred to as page.property=<%=serverlocation%>. At least three server locations may be supported. Thelocations are referred to as the “lifetimes” of the properties. Thethree locations include on a page, in a session, and in an application.The term “on the page” means that the property is initialized to thenull string when the page is composed. When the page is completed, noaction is taken to modify the property. The session property isinitialized from the session variable when the page is composed. Whenthe page composition is complete, the session variable is updated. Inthe application location is treated the same as the session variable.

During normal operation of an ASP Object, a page is composed, deliveredto the browser, run and then client script causes the browser tonavigate to a new page, possibly another ASP Object. The browseradvances to the desired page immediately. No changes to state by theclient are automatically propagated back to the server. If the developerneeds to move state back to the server, it may be manually coded usingFORM elements, cookies, etc.

If the developer requests it, the programming model can operate suchthat changes to state can be sent back to the server. The operation ofan ASP Object in this mode is the same as above, except that when clientscript is invoked to advance to the next page, the page state iscollected, then it is delivered to the same page using a FORM POST, thestate information is saved and then a redirect is used to advance thebrowser to the desired page.

The following provides examples of the invocations of the varioustechniques mentioned above as compared to conventional programmingpractices.

a) Method Invocation

When navigating from one page to another or even back to the same page,a conventional technique is to place one of the following constructsonto the page:

<SCRIPT LANGUAGE=VBSCRIPT> Sub button_onclick( ) window.location.href =“reports/topscores.asp?category=baseball&start=1936&end= 1945”End Sub</SCRIPT> or <AHREF=“reports/topscores.asp?category=baseball&start=1936&end=1945”>Baseball Scores</A>

Both constructs involve reacting to some user action to cause thebrowser to move to a new page or to revisit the current page. Theconstructs get more involved when variables are used as part of thedestination URL:

<SCRIPT LANGUAGE=VBSCRIPT> Sub button_onclick( )  parameters =“?category=” & catCurrent  parameters = parameters & “&start=” &datStart  parameters = parameters & “&end=” & datEnd window.location.href = “reports/topscores.asp” & parameters End Sub</SCRIPT>

The complications continue if a parameter is to be completely omitted:

<SCRIPT LANGUAGE=VBSCRIPT> Sub button_onclick( )  parameters = “?”  IfNot IsNull(catCurrent) Then  parameters = “category=” & catCurrent  EndIf  If Not IsNull(datStart) Then  parameters = parameters & “&start=” &datStart  End If  If Not IsNull(datEnd) Then  parameters = parameters &“&end=” & datEnd  End If  window.location.href = “reports/topscores.asp”& parameters End Sub </SCRIPT>

The page object model aspect of the current invention collapses all ofthis into a single, programmatic notation:

<SCRIPT LANGUAGE=VBSCRIPT> Sub button_onclick( ) TopScores.navigate.show(catcurrent, datStart, datEnd) End Sub </SCRIPT>

The significant information is passed to a routine on an object thatrepresents the file “reports/topscores.asp”. That object is called“TopScores” and was explicitly named by the web site author. The “show”method was also explicitly created by the author of the “TopScores”page.

The invention includes capabilities, which are common to programmingtools, such as ‘statement completion’. This is an aid that is providedto the author where as the method invocation is typed, prompts arepresented which describe the available choices at a given point. Thoseprompts include a list of methods available and, once a method isselected, a list of the parameters that should be passed to the method.

Internal to a method invocation supported by the invention, the samesort of operation performed in the samples above is accomplished behindthe scenes. The parameters are converted to text, concatenated togetheras appropriate into a URL and then that URL is contained in theinformation sent to the composition space. Once received, theinformation is unpacked and the actual method, which exists in thecomposition space, is invoked. The invocation is actually morecomplicated than that and a number of other operations are intermingledwith the ones described. However, the essentials are covered by theabove.

b) Property Management

There are four aspects to managing property information on a web page:access in the composition space, propagation to the interaction space,access in the interaction space, and propagation to the compositionspace.

Each of these four aspects requires a specific technique or techniques,and the resulting content in the authored page can be nearly impossibleto maintain. Because the invention considers all four aspects to be partof a single problem, the invention presents the single concept of a pageproperty to solve that problem.

A page property is created by an author. The author chooses the name ofthe property, how it may be accessed in the composition and interactionspaces (read-only versus read-write, etc), and its ‘lifetime’. Thelifetime is a statement of where the data of the property should beofficially stored. There are three lifetimes: page, session andapplication. The notion of ‘forever’ would be another lifetime thatmight suggest storage in a database on the server. The invention doesnot provide an implementation of a ‘forever’ lifetime, but it is easilywithin the scope of the invention.

The invention provides access to property values via ‘get’ and ‘set’methods. Those methods are referenced asvariable=TopScores.getproperty( ) TopScores.setproperty(variable)

This notation is used identically in the composition and interactionspaces.

(1) Access in the Composition Space

Script running during composition retrieves the latest value from theappropriate storage location at the beginning of page composition andautomatically stores changes to that location as changes are made. Allaccess is accomplished via getproperty and setproperty methodsassociated with the page object.

(2) Propogation to the Interaction Space

Script running at the end of the composition phase outputs script thatprovides the necessary object model in the interaction space. Thatscript includes the values of the various pieces of data as initializersto internal variables. Also output are a set of hidden input fields thatwill be used in item 4 below.

(3) Access in the Interaction Space

As with the composition space II access is accomplished via getpropertyand setproperty methods associated with the page object.

(4) Propagation to the Composition Space.

As changes are made to properties via setproperty methods in theinteraction space, the changed values are stored in the hidden inputfields created in item 2. When the user interacts with the page suchthat a method in a page should be executed, the property values arepropagated back to the composition space by posting the current page'sFORM element. That post operation causes the hidden input fields to besent to the composition space where they are unpacked and stored in theappropriate data storage, as well as being made available to a new passthrough the composition space—starting with item 1.

There are sufficient controls provided by the invention that an authorcan control a variety of aspects of data management, includingpermitting access only within the composition space or access onlywithin the interaction space, etc.

c) Controlling Composition

The invention changes the normal pattern of page composition of an ASP.That is, it takes advantage of the very general page compositionapproach used, and creates a more specific approach. The standard ASPpage composition technique is to process the page from the beginning tothe end, generating output as the page is processed. The inventionintroduces a variety of notions, including ‘events’ that are fired atthe beginning and end of page composition. Also part of the invention'sinnovations is the execution of a page method as described above.

The composition process of a page object may follow these steps:

1. Run all constructors defined on the page. Constructors are usuallyadded to the page by Design Time Controls, which leverage theinvention's page composition model.

2. Fire the oninit event, completing any initialization steps that couldnot happen in the construction phase. As above, oninit event handlersare usually added to the page by Design Time Controls.

3. Fire the onenter event, which is usually implemented by the pageauthor and permits execution of page initialization operations.

4. Invoke the requested method on the page.

5. Complete conventional processing on the page. This means that thepage is processed from beginning to end as a conventional ASP would.There are controls provided by the invention to skip this step, which isusually what happens when the requested method generates the completeresponse that would normally be generated by processing the page.

6. Fire the ‘onexit’ event.

7. Run all destructors defined on the page. As with the constructors,destructors are usually added to the page by Design Time Controls.

Various objects may be incorporated into the scripting libraries asdiscussed above. The objects and their definitions may include:

-   -   Page—Allows developers to treat ASP pages as objects with        methods, properties, and events    -   Recordset—Supports data-binding to an ADO recordset using the        Data Environment    -   Textbox—A data-bound textbox    -   Label—A data-bound label    -   Listbox—A data-bound listbox with static or data-bound lookup        values    -   Button    -   RSNavBar—A set of buttons for navigating through a list of items    -   Checkbox    -   OptionGroup

The sections below show some examples of web programming tasks and howthe SOM makes implementing them easier and simpler. The samples are notintended to illustrate real-world applications but rather the kinds ofimplementation issues web programmers face.

(1) Processing User Input on the Server

This sample page implements two textboxes, a listbox, and button. Theuser enters numbers in two textboxes, selects an arithmetic operation,clicks the button to post the form, and then server script performs theoperation on the numbers and shows the result The page also preservesthe data the user entered when the page is regenerated after the post.

Below is a version of this page implemented using traditional ASPprogramming:

<% Dim Result, Operation Dim Value1, Value2 Dim HaveResult Value1 = 1Value2 = 1 HaveResult = False IfRequest.ServerVariables(“REQUEST_METHOD”) = “POST” Then   Value1 =CInt(Request.Form(“text1”))   Value2 = CInt(Request.Form(“text2”))   Op= CInt(Request.Form(“select3”))   HaveResult = True   Select Case Op  Case 10:     Result = Value1 + Value2     Operation = “ plus ”   Case20:     Result = Value1 − Value2     Operation = “ minus ”   Case 30:    Result = Value1 / Value2     Operation = “ divided by ”   Case 40:    Result = Value1 * Value2     Operation = “ times ”   End Select EndIf %> <form method=POST> Number 1:<input type=text name=text1value=“<%=Value1%>”><br> Number 2:<input type=text name=text2value=“<%=Value2%>”> <select name=select3> <option value=10 <% If Op =10 Then Response.Write “SELECTED” %>>Add</option> <option value=20 <% IfOp = 20 Then Response.Write “SELECTED” %>>Subtract</option> <optionvalue=30 <% If Op = 30 Then Response.Write “SELECTED” %>>Divide</option><option value=40 <% If Op = 40 Then Response.Write “SELECTED”%>>Multiply</option> </select><br> <input type=submit value=“Submit”> <%If HaveResult Then  Response.Write(“<p>” & Value1 & Operation & Value2 &“ is ” & Result & “</p>”) End If %> </form>

To a designer familiar with conventional programming languages likeVisual Basic or Java, this simple application appears confusing. Tounderstand how to build a page like this, the developer is required tohave a deep level of understanding about the interaction between the webserver and browser and how HTML forms posting works. This programmingmodel also cannot be easily represented in a visual rapid applicationdevelopment model, which leaves the developer hand-coding the page.

Compare this to the same sample created with the scripting object modelusing DTCs:

<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT> Sub thisPage_onenter( )   IfthisPage.firstEntered Then     TextBox1.value = 1     TextBox2.value = 1    ListBox1.addItem “Add”, 10     ListBox1.addItem “Subtract”, 20    ListBox1.addItem “Divide”, 30     ListBox1.addItem “Multiply”, 40    ListBox1.selectByValue(10)     End If End Sub Sub Button1_onclick  ‘Dim Result   Dim Value1, Value2   Value1 = CInt(TextBox1.value)  Value2 = CInt(TextBox2.value)   Select Case CInt(ListBox1.getValue( ))  Case 10:     Result = Value1 + Value2     Operation = “ plus ”   Case20:     Result = Value1 − Value2     Operation = “ minus ”   Case 30:    Result = Value1 / Value2     Operation = “ divided by ”   Case 40:    Result = Value1 * Value2     Operation = “ times ”   End Select  Label1.setCaption(Value1 & Operation & Value2 & “ is ” & Result) EndSub </SCRIPT> Number 1: [TEXT BOX1] <br> Number 2: [TEXT BOX2] [MENU]<br> [SUBMIT BUTTON] <p> [LABEL1] </p>

The above sample may be quickly created by dragging a few controls intothe editor and creating two event handlers—thisPage_onenter, which isfired when the user first navigates to the ASP page, andButton1_onclick.

(2) Navigating to a Server Method on a Page

The script fragments below show a conventional way of passinginformation to a server page by building a query string into the URLpassed to the server:

PAGE1.ASP:   <%   Response.Write(“<A  HREF=““page2.asp?function=ProcessQueryl&parm1=” & parm1 &   “&parm2=”& parm2 & ““>Start Query 1</A>”)   Response.Write(“<A  HREF=““page2.asp?function=ProcessQuery2&parm1=” & parm3   &““>StartQuery 2</A>”)   %> PAGE2.ASP   <%   parm1 = Request.QueryString(“parm1”)  parm2 = Request.QueryString(“parm2”)   func =Request.QueryString(“function”)   If func = “ProcessQuery1” Then    ‘code for the first operation     Else       ‘code for the secondoperation     End If   %>

This process may be quickly complicated as the number of possibleoperations and parameters increases.

Through the Page object, the scripting object model provides ageneral-purpose way of publishing methods on a page so they can beinvoked from client script on the current page or on other pages thatreference the current page. The Page Object DTC provides a graphical wayto publish methods using the Page object. The script fragments belowshow the same functionality implemented using the Page Object:

PAGE1.ASP:   <%   Response.Write(“<A  HREF=‘Javascript:page2.navigate.ProcessQuery1(parm1,   parm2)’>StartQuery 1</A>”)   Response.Write(“<A  HREF=‘Javascript:page2.navigate.ProcessQuery2(parm3)’>Start   Query2</A>”)   %> PAGE2.ASP   <SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>   SubProcessQuery1(parm1, parm2)     ‘code for first operation   End Sub  Sub ProcessQuery2(parm1)     ‘code for second operation   End Sub  </SCRIPT>

The two methods on PAGE2 were published using the Page Object DTC, and areference to PAGE2 was made from PAGE1 also using the Page Object DTC,to make those methods available in the SOM on PAGE1. The resulting codeis simpler and far more readable than in the first example because ituses a more familiar programming model.

(3) Remote Execution of a Server Method

Another example is remote scripting. The Page object allows a developerto publish a method on a page that can be called synchronously orasynchronously from the client without posting a form. This allows a webpage to remain live in the browser while a script function on the serveris called and returns a value. The call can be synchronous; blockinguntil the remote call completes, or a callback function can be providedto process the function's return value asynchronously. Remote methodcalls can save bandwidth and reduce server load by avoiding the cost ofregenerating the entire page after a post and sending it to the browser.

The sample below shows an asynchronous remote scripting call that passesa user name to a server script function that returns the correspondinguser id. A callback function processes the return value and navigates toa members page if the user id is valid.

[PAGE OBJECT] <% Function Lookup(name)   Lookup = dbLookupUser(name) EndFunction %> <SCRIPT> function ProcessResult(rscb) {   if(rscb.return_value == −1)     alert(“You do not have a valid user id.”)  else     Members.navigate.LoginUser(rscb.return_value); } </SCRIPT><INPUT TYPE=TEXT NAME=UserName VALUE=“”> <BUTTON NAME=EnterVALUE=“Enter” ONCLICK=‘thisPage execute.Lockup(thisForm.UserName.value,ProcessResult)’>

(4) Sharing State Between Client and Server

Earlier examples addressed the issues of state management bydemonstrating that the scripting object model objects manage their ownstate. To maintain state between objects, an additional approach can beused. The ASP script fragment below shows how this may be done using ahidden form element. The page initializes a value and then increments itby one each time the user clicks a button.

<% Dim Value1 If Request.ServerVariables(“REQUEST_METHOD”) = “POST” Then  Value1 = Request.Form(“Value1”)   Value1 = Value1 + 1 Else   Value1 =0 End If %> <FORM NAME=MyForm METHOD=POST> <INPUT TYPE=HIDDENNAME=Value1 VALUE=“<%=Value1%>”> Value = <%=Value1%><br> <INPUTTYPE=SUBMIT VALUE=“Submit”>

The scripting object model (SOM) makes state management easier byproviding a way to publish page properties through the Page object.Using the Page Object DTC the developer can publish a property, whichcan then be accessed using “get” and “set” methods on the Page Object.The sample below shows the same functionality implemented using the SOM:

[PAGE OBJECT] <SCRIPT LANGUAGE=VBSCRIPT RUNAT=SERVER> SubthisPage_onenter   If thisPage.firstEntered Then    thisPage.setValue1(0)   ‘End If End Sub Sub Button1_onclick  thisPage.setValue1(thispage.getValue1( ) + 1)   End Sub </SCRIPT>Value = <%=thisPage.getValue1( )%><br> <INPUT TYPE=SUBMITVALUE=“Submit”>

The remote scripting components of the Scripting Library include a setof client script functions and objects that can be used in conjunctionwith the Page Object DTC or separately. When used with the Page ObjectDTC, remote scripting functions are published as methods of the executeobject.

G. Construction of Objects

The Scripting Object Model (SOM) provides an event-based execution modelfor ASP pages. As discussed above, while in actuality, the page isexecuted serially as any other ASP page, the SOM provides a frameworkfor programming to an event-based model.

At a high-level, the execution and eventing sequence is similar to theDHTML browser execution sequence. Objects on the page are constructedand initialized. An onenter event is fired to indicate that the page isloaded and all objects are ready to be scripted. This is an ideal placeto initialize variables and objects. After the onenter event is fired,execution is transferred to an entry-point or event-handler. By default,the content portion of the page will be executed which is equivalent toinvoking the show entry-point. In many cases, execution will transfer toa server-side handler as a result of a button click or some other useraction. An onshow event is fired just prior to executing the contentportion of the page. This is an ideal place to set the final state forany objects just prior to them rendering their HTML output. After thecontent portion of the page is executed, an onexit event is fired toindicate the page is unloading.

1. Execution and Event Sequence

a) Object Construction Phase

Each object is constructed. This is accomplished by executing allJScript functions which conform to the following naming convention,“xxxx_ctor”. The DTCs generate a _ctor function for the runtime objectthey represent. One implementation executes each _ctor in the order itappears on the page. An object constructor should be self-contained, andshould not expect any other object to have already been constructed.

b) Construction of the “thisPage” Object

The first object constructed will be a SOM Object named thisPage. Thisobject provides properties, methods, and events that comprise theScripting Object Model. Other objects will use the thisPage object forstate services, event notification, and other purposes.

c) Registering an Initialization Function

The constructor function of each object will register an initializationfunction with the thisPage object via the advise method. Theinitialization functions will be invoked during the initializationphase, after all object constructors have been invoked. A pointer to theinitialization function is provided as a parameter to the constructor,and the function implementation is generated by a DTC based on theproperties set at design-time. A Recordset object will register itsinitialization function with a higher priority than other objects. Thisensures that the Recordset objects will be initialized before any otherobjects that may depend on the Recordset for databinding.

d) Registering Default EventHandlers

The constructor function for most objects may register any defaultEventHandlers for the object. A default EventHandler is a method whichconforms to the naming convention “object_event”. The Recordset objectwill defer registration of its default EventHandlers until the end ofthe initialization phase (with the exception of the onbeforeopen event).This ensures that the default Recordset EventHandlers will not be fireduntil all other objects have been both constructed and initialized.

e) Object Initialization Phase

The registered initialization functions will be invoked in this phase.The functions are invoked in priority order, with functions of samepriority being invoked in the order registered.

f) Recordset Initialization

The Recordset initialization functions are registered with a highpriority, such that all Recordsets will be initialized before any otherobjects. The initialization function of the Recordset will setup theconnection and command for the Recordset based upon settings chosen viathe Recordset DTC property pages at design-time. If the Recordset is setto autoopen or if the Recordset was left open on the previous roundtripto this same page, the Recordset will be opened at this point. Toprevent a Recordset from being opened during this initialization phase,the autoopen flag should be disabled in the DTC property page, and theRecordset should be explicitly closed prior to exiting the page. ThethisPage_onexit handler is a good place for closing Recordsets.

g) Object Initialization

Object initialization functions are registered with a neutral priority,and will be invoked after high priority initialization functions, suchas those for the Recordset. Objects which are set to databind to aRecordset, will use the advise method of the appropriate Recordset toregister a handler on the onrowenter event and possible theonbeforeupdate event. The onrowenter handler will be used to bind datafrom the Recordset into the object. The onbeforeupdate handler will beused to bind data from the object into the Recordset. If the Recordsetis already open when an object registers an onrowenter handler, thenthat handler will be invoked immediately in order to bind the object tothe current row of the Recordset. Following the registration ofdatabinding handlers, the object will restore any state that has beenroundtripped back to this page.

H. Summary

The programming model and embodiments thereof in various forms providesa number of advantages to the various users. For example, the systemprovides an easier way for developers to conceptualize a site. Also, intargeting an IE 4 DHTML client, a programmer can run VB-like forms, canwrite code for the end client and can provide an interactive environmentfor the end client. Further, supplied forms may be supported by objectsand script behind the form. This form then can execute on a server in alinear sequence.

While the above embodiments considered with reference to design-timecontrols, alternative controls may also be used. In particular, becausea design-time control can be made part of a page, and thereforeinadvertently deleted by a developer, an alternative embodiment of theinvention uses separate pages for the control and property pages foreach object. These pages would be inaccessible by developers by placingthem in an alternate directory or by making them read-only.

Depending on its programming, each design-time control may includenon-ActiveX scripts as well. Therefore, by instantiating the design-timecontrol into a web page, the resulting run-time code may include boththe ActiveX implementation as well as the non-ActiveX counterpart.Non-ActiveX scripts may include, for example, JAVA® (by SumMicrosystems). Other non-ActiveX scripts may also be included.

It will be apparent to those skilled in the art that application of thepresent invention is not restricted to the Internet. It is alsoenvisioned that the techniques of the present invention apply to anynetwork using HTTP, including HTTPS-compliant networks, intranets andextranets. It is further envisioned that the techniques of the presentinvention apply in any text-authoring context where complex scriptsrequire detailed knowledge of databases as well as related pages. Forexample, embodiments of the present invention contemplate the use of theprogramming object modeling system in conjunction with other systemsincluding spreadsheets and other related environments.

Further, the present invention may also be implemented in a peer-to-peercomputing environment or in a multi-user host system with a mainframe ora minicomputer. Thus, the computer network, in which the invention isimplemented, should be broadly construed to include any client/servercomputer network from which a client can retrieve a remote document on aserver (even if that document is available on the same machine orsystem).

In the foregoing specification, the present invention has been describedwith reference to specific exemplary embodiments thereof. Although theinvention has been described in terms of a preferred embodiment, thoseskilled in the art will recognize that various modifications,embodiments or variations of the invention can be practiced within thespirit and scope of the invention as set forth in the appended claims.All are considered within the sphere, spirit, and scope of theinvention. The specification and drawings are, therefore, to be regardedin an illustrated rather than restrictive sense. Accordingly, it is notintended that the invention be limited except as may be necessary inview of the appended claims.

1. A computer system for designing internet-accessible datasets, thesystem comprising: a processor, computer-readable storage, andcomputer-executable instructions; the storage, in combination with theprocessor, providing a design space to a developer where the developerdevelops programs that call objects with methods and properties, eachproperty comprising a lifetime statement, the lifetime statementspecifying where the data of the property is to be stored and a lifetimecomprising one of page, session, and application, and wherein the designspace provides an event-driven model and input from the developer to thedesign space comprises events; the storage, in combination with theprocessor, further providing a composition space, the composition spacebeing a serial execution environment; wherein the design space isconfigured to output documents containing the programs with theevent-driven model and the input to the composition space; the systemconverting the programs from said design space into web pages for aruntime space in which said objects with the methods and the propertiesare represented as server-executable web pages and where a first page ofsaid pages invokes a method or property from a second page of said pageswherein a design-time control of the first page locates and instantiatesa design-time control of the second page for the invocation; and whereinwhen a method or property from the second page is invoked, the secondpage passes between the composition space and an interaction spaceacross a server-client transition, wherein the runtime space becomes theinteraction space when a remote client interacts with theserver-executable web pages served by a server during the server-clienttransition, wherein in response to a request from a browser in theinteraction space, the server-executable web pages execute andinstantiate the objects with the stored property data persisted in theinteraction space, wherein the browser receives the events and transmitsthe events and the stored property data to the composition space tohandle the events.
 2. The computer system according to claim 1, whereinsaid design space is an event-driven space.
 3. The computer systemaccording to claim 2, wherein said runtime space exists on a server thatprocesses said web pages.